import json

output_path = 'D:/Codes/tsp_robot/src/problem/tsptw/solving/config.json'

py_obj = []

with open(file='C:/Users/24298/Desktop/1.csv', mode='r') as f:
    for lines in f:
        lines = lines.split()
        obj = { 'name' : lines[0], 'x' : int(lines[1]), 'y' : int(lines[2])}
        py_obj.append(obj)

with open(file=output_path, mode='w') as f:
    j = json.dumps(py_obj)
    print(j, file=f)